import request from '@/utils/request'

// 查询画课记录列表
export function listCourse(query) {
  return request({
    url: '/yushi/course/list',
    method: 'get',
    params: query
  })
}

// 医生画课统计查询
export function getDoctorCourseStatisticsList(query) {
  return request({
    url: '/yushi/course/getDoctorCourseStatisticsList',
    method: 'get',
    params: query
  })
}
// 患者画课统计查询
export function getPatientCourseStatisticsList(query) {
  return request({
    url: '/yushi/course/getPatientCourseStatisticsList',
    method: 'get',
    params: query
  })
}

// 查询画课记录详细
export function getCourse(courseId) {
  return request({
    url: '/yushi/course/' + courseId,
    method: 'get'
  })
}

// 新增画课记录
export function addCourse(data) {
  return request({
    url: '/yushi/course',
    method: 'post',
    data: data
  })
}

// 修改画课记录
export function updateCourse(data) {
  return request({
    url: '/yushi/course',
    method: 'put',
    data: data
  })
}

// 删除画课记录
export function delCourse(courseId) {
  return request({
    url: '/yushi/course/' + courseId,
    method: 'delete'
  })
}

// 确认画课
export function confirmCourse(courseId) {
  return request({
    url: '/yushi/course/confirmCourse/' + courseId,
    method: 'put'
  })
}
